import 'package:floor/floor.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_demo/ui/db/floor/database.dart';
import 'package:sqflite/sqflite.dart' as sqflite;
import 'package:flutter_demo/ui/db/floor/entity/memo.dart';

import '../../../MyApp.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  var db = DBUtil();
  await db.initDB();
  final dao = db.memoDao;
  dao.insertMemo(Memo(title: "title", content: "content", createdTime: DateTime.now(), modifiedTime: DateTime.now(), tags: ["a","b"]));
  var result = await dao.findAllMemos();
  runApp( MyApp());
}